<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>display</title>
    <style>
        #d1{
            width: 300px;
            height: 300px;
            background-color: red;
            /* 将元素设置为块元素/将块元素显示 */
            /* display:block */
             display: none;  
            
        }
        #d2{
            width: 300px;
            height: 300px;
            background-color: blue;
            /* 元素隐藏，保持元素的大小和位置 */
             visibility: hidden;
        }

        #s1{
            width: 200px;
            height: 200px;
            background-color: red;
            /* 将元素设置为行元素/将行元素显示  行元素对于width和height无效 */
            /* display:inline; */
            display:block;
        }
    </style>
</head>
<body>
    <div id="d1">

    </div>
    <div id="d2"></div>
    <span id="s1">span</span>
</body>
</html>